
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <meta charset="utf-8">
    <title>layui</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" type="text/css" href="css/slick.css"/>
    <link rel="stylesheet" type="text/css" href="css/bootstrap.css"/>
    <link rel="stylesheet" type="text/css" href="css/jquery.mmenu.all.css"/>
    <link rel="stylesheet" type="text/css" href="css/style.css"/>
    <link href="font-awesome-4.5.0/css/font-awesome.min.css" rel='stylesheet' type='text/css' media="all" />
    <link rel="stylesheet" type="text/css" href="css/animate.css"/>
    <script src="js/jquery.min.js"></script>
<%--    <script src="/layui/layui.js" charset="utf-8"></script>--%>
    <link rel="stylesheet" href="/layui/css/layui.css"  media="all">
</head>
<body>
<header class="header">
    <div class="container clearfix">
        <div class="logo">
            <a href="index.html"><!--<img src="images/logo.png" alt="" />--><h1>Hello</h1></a>
        </div>
        <div class="nav_right">
            <nav>
                <ul class="clearfix">
                    <li><a href="index.html">首页</a></li>
                    <li><a href="case.html">挑选爱犬</a>
                        <ul>
                            <li><a href="case.html">小型犬</a></li>
                            <li><a href="case.html">中型犬</a></li>
                            <li><a href="case.html">大型犬</a></li>
                        </ul>
                    </li>
                    <li><a href="kehu.html">狗狗周边</a>
                        <ul>
                            <li><a href="kehu.html">北京</a></li>
                            <li><a href="kehu.html">上海</a></li>
                            <li><a href="kehu.html">天津</a></li>
                        </ul>
                    </li>
                    <li><a href="fuwu_price.html">寻找另一半</a></li>
                    <li><a href="about.jsp" class="active">个人中心</a>
                        <ul>
                            <li><a href="about.jsp">公司简介</a></li>
                            <li><a href="about_fuwu.html">我们的服务</a></li>
                            <li><a href="about_wh.html">企业文化</a></li>
                        </ul>
                    </li>
                    <li><a href="team.html">购物车</a>
                        <ul>
                            <li><a href="team.html">北京</a></li>
                            <li><a href="team.html">上海</a></li>
                            <li><a href="team.html">天津</a></li>
                        </ul>
                    </li>

                    <li><a href="news.html">新闻资讯</a>
                        <ul>
                            <li><a href="news.html">最新优惠</a></li>
                            <li><a href="news.html">公司新闻</a></li>
                            <li><a href="news.html">行业新闻</a></li>
                        </ul>
                    </li>
                    <li><a href="contact.html">联系我们</a>
                        <ul>
                            <li><a href="contact.html">联系我们</a></li>
                            <li><a href="feedback.html">在线留言</a></li>
                        </ul>
                    </li>
                </ul>
            </nav>
            <div class="cen">
                <a href="">CN</a>
                <a href="">EN</a>
            </div>
        </div>


        <a href="#mmenu" class="phone-nav"><i class="fa fa-list"></i></a>




    </div>
</header>
<div class="crumbs">
    <div class="centerBlock">您当前的位置：<a href="index.html">首页 </a>  > <span>个人中心</span></div>
</div>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>

<div class="content" style="height: 600px; width: 70%;margin: auto;">


    <div class="comon_top">
        <div class="top_nav">
            <a href="mycenter"  ><span>个人信息</span></a><a href="sellDog"><span>我要卖狗狗</span></a><a href="shouchang"><span>我的收藏</span></a>
            <a href="about"  ><span>我的购物车</span></a><a href="dizhi" class="active"><span>地址管理</span></a><a href="uppwd"><span>修改密码</span></a>
        </div>
    </div>
    <br>
    <hr>
    <br>


    <div class="layui-form">
        <table class="layui-table">
            <colgroup>
                <col width="150">
                <col width="150">
                <col width="200">
                <col>
            </colgroup>
            <thead>
            <tr>
                <th>联系地址</th>
            </tr>
            </thead>
            <tbody>
            <tr>
                <td >${user.userAddress}</td>

            </tr>

            </tbody>
        </table>
    </div>
    <br>
    <hr>
    <br>



           <form action="useraddr" method="post">
               <input type="hidden" name="id" value="${user.userId}">
               区：
               <select style="width: 100px;" id="pre" name="quyu" onchange="chg(this);">
                   <option >请选择</option>
               </select>
               街：
               <select style="width: 100px;" name="street" id="city" onchange="chg2(this)" ;></select>
               门牌号：
               <select style="width: 100px;" name="number" id="area"></select>
               <br>
               <hr>
               <br>
               <br>
               <br>
               <br>

               <div class="layui-form-item">
                   <div class="layui-input-block">
                       <button class="layui-btn" lay-submit="" lay-filter="demo1">立即提交</button>
                   </div>
               </div>
           </form>





</div>





</form>



<!--Include Js-->
<script src="js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
<!--移动端导航-->
<script src="js/jquery.mmenu.all.min.js" type="text/javascript" charset="utf-8"></script>
<!--slick-->
<script src="js/slick.min.js" type="text/javascript" charset="utf-8"></script>
<script src="js/wow.js" type="text/javascript" charset="utf-8"></script>

<!--placeholder-->
<script src="js/jquery.placeholder.min.js" type="text/javascript" charset="utf-8"></script>
<script type="text/javascript">
    $(function(){ $('input, textarea').placeholder(); });
</script>
<script src="js/public.js" type="text/javascript" charset="utf-8"></script>




    <script>
        //声明省
        var pres = ["锦江", "武侯", "高新"]; //直接声明Array
        //声明市
        var cities = [
            ["步行街", "商业街", "小西街"],
            ["步行街", "商业街", "小西街"],
            ["步行街", "商业街", "小西街"]
        ];
        var areas = [
            [
                ["0-100号之间", "100-200号之间", "200-300号之间"],
                ["0-100号之间", "100-200号之间", "200-300号之间"],
                ["0-100号之间", "100-200号之间", "200-300号之间"]
            ],
            [
                ["0-100号之间", "100-200号之间", "200-300号之间"],
                ["0-100号之间", "100-200号之间", "200-300号之间"],
                ["0-100号之间", "100-200号之间", "200-300号之间"]
            ],
            [
                ["0-100号之间", "100-200号之间", "200-300号之间"],
                ["0-100号之间", "100-200号之间", "200-300号之间"],
                ["0-100号之间", "100-200号之间", "200-300号之间"]
            ]
        ]
        //设置一个省的公共下标
        var pIndex = -1;
        var preEle = document.getElementById("pre");
        var cityEle = document.getElementById("city");
        var areaEle = document.getElementById("area");
        //先设置省的值
        for(var i = 0; i < pres.length; i++) {
            //声明option.<option value="i">pres[i]</option>
            var op = new Option(pres[i], i);

            //添加
            preEle.options.add(op);
        }

        function chg(obj) {
            if(obj.value == -1) {
                cityEle.options.length = 0;
                areaEle.options.length = 0;
                return;
            }
            //获取值
            var val = obj.value;
            pIndex = obj.value;
            //获取ctiry
            var cs = cities[val];
            //获取默认区
            var as = areas[val][0];
            //先清空市
            cityEle.options.length = 0;
            areaEle.options.length = 0;
            for(var i = 0; i < cs.length; i++) {
                var op = new Option(cs[i], i);
                cityEle.options.add(op);
            }
            for(var i = 0; i < as.length; i++) {
                var op = new Option(as[i], i);
                areaEle.options.add(op);
            }
        }

        function chg2(obj) {
            var val = obj.selectedIndex;
            var as = areas[pIndex][val];
            areaEle.options.length = 0;
            for(var i = 0; i < as.length; i++) {
                var op = new Option(as[i], i);
                areaEle.options.add(op);
            }
        }
    </script>


<%--<script>
    layui.use(['form', 'layedit', 'laydate'], function(){
        var form = layui.form
            ,layer = layui.layer
            ,$=layui.$
            ,layedit = layui.layedit
            ,laydate = layui.laydate;

        //日期
        laydate.render({
            elem: '#date'
        });
        laydate.render({
            elem: '#date1'
        });

        //创建一个编辑器
        var editIndex = layedit.build('LAY_demo_editor');

        //自定义验证规则
        form.verify({
            title: function(value){
                if(value.length < 5){
                    return '标题至少得5个字符啊';
                }
            }
            ,pass: [/(.+){6,12}$/, '密码必须6到12位']
            ,content: function(value){
                layedit.sync(editIndex);
            }
        });

        //监听指定开关
        form.on('switch(switchTest)', function(data){
            layer.msg('开关checked：'+ (this.checked ? 'true' : 'false'), {
                offset: '6px'
            });
            layer.tips('温馨提示：请注意开关状态的文字可以随意定义，而不仅仅是ON|OFF', data.othis)
        });

        //监听提交
        form.on('submit(demo1)', function(data){
            /*layer.alert(JSON.stringify(data.field), {
                title: '最终的提交信息'
            })*/
            $.post('/save',data.field,function (res) {
                if(res.code==0){
                    layer.open({
                        type:0,
                        title:'消息',
                        content:res.msg+'，3后跳转',
                        closeBtn: 0,
                        time: 3000,
                        end:function () {
                            location.href = '/list';
                        }
                    });
                }
            });
            return false;
        });


    });
</script>--%>

</body>
</html>
